home *** CD-ROM | disk | FTP | other *** search
/ Cream of the Crop 26 / Cream of the Crop 26.iso / program / ddj0897.zip / DYN401.ZIP / class / sequence.c < prev    next >
C/C++ Source or Header  |  1997-04-16  |  855b  |  58 lines

  1.  
  2.  
  3. /*  Copyright (c) 1993-1996 Algorithms Corporation  */
  4. /*  All rights reserved.  */
  5.  
  6.  
  7.  
  8.  
  9. /*  This file automatically generated by dpp - do not edit  */
  10.  
  11. #define    DPP_STRATEGY    2
  12. #define    DPP_FASTWIDE    0
  13.  
  14.  
  15.  
  16.  
  17. #define    CLASS    Sequence_c
  18. #define    ivType    Sequence_iv_t
  19.  
  20. #include "generics.h"
  21.  
  22. object    Sequence_c;
  23.  
  24.  
  25.  
  26. #line 27 "sequence.c"
  27.  
  28. objrtn    Sequence_initialize(void)
  29. {
  30.     static  CRITICALSECTION  cs;
  31.     static  int volatile once = 0;
  32.  
  33.     ENTERCRITICALSECTION(_CI_CS_);
  34.     if (!once) {
  35.         INITIALIZECRITICALSECTION(cs);
  36.         once = 1;
  37.     }
  38.     LEAVECRITICALSECTION(_CI_CS_);
  39.  
  40.     ENTERCRITICALSECTION(cs);
  41.  
  42.     if (Sequence_c) {
  43.         LEAVECRITICALSECTION(cs);
  44.         return Sequence_c;
  45.     }
  46.     INHIBIT_THREADER;
  47.     Sequence_c = gNewClass(Class, "Sequence", 0, 0, END);
  48.  
  49.     ENABLE_THREADER;
  50.  
  51.     LEAVECRITICALSECTION(cs);
  52.  
  53.     return Sequence_c;
  54. }
  55.  
  56.  
  57.  
  58.